<html>
  <head>
    <META http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="stylesheet" type="text/css" href="..\..\..\JavaDoc.css">
  </head>
  <body>
    <table class="nav">
      <tr>
        <td class="nav1" colspan="2">
          <table cellspacing="3">
            <tr>
              <td>
                <a href="..\..\..\overview-summary.html"> Overview </a>
              </td>
              <td>
                <a href="namespace-summary.html">Namespace</a> </td>
              <td class="nav1sel"> Type </td>
              <td>Use </td>
              <td>Tree </td>
              <td>Deprecated </td>
              <td>Index </td>
              <td>Help </td>
            </tr>
          </table>
        </td>
        <td class="logo" rowspan="2">.NET Framework</td>
      </tr>
      <tr class="nav2">
        <td>PREV TYPE    NEXT TYPE</td>
        <td>FRAMES    NO FRAMES</td>
      </tr>
      <tr class="nav2">
        <td>SUMMARY: INNER | <a href="#field-summary">FIELD</a> | <a href="#constructor-summary">CONST</a> | PROP | <a href="#method-summary">METHOD</a> | OP | EVENT</td>
        <td>DETAIL: <a href="#field-detail">FIELD</a> | <a href="#constructor-detail">CONST</a> | PROP | <a href="#method-detail">METHOD</a> | OP | EVENT</td>
      </tr>
    </table>
    <hr>
    <h2>
      <span class="namespaceName">NVelocity.Http.Tool</span>
      <br>
      <span class="className">Class MultiViewsTool</span>
    </h2>
    <p>Allows for transparent content negotiation in a manner mimicking
            Apache httpd's MultiViews.Reads the default language out of the ViewContext as
            <pre class="code">org.apache.velocity.tools.view.i18n.defaultLanguage</pre>.
            See {@link #findLocalizedResource(String, String)} and {@link
            #findLocalizedResource(String, Locale)} for usage.</p>
    <a name="field-summary">
    </a>
    <table class="table" cellspacing="0">
      <thead>
        <tr>
          <th colspan="2">Field Summary</th>
        </tr>
      </thead>
      <tr>
        <td class="fieldType" valign="top">string</td>
        <td class="field">
          <a href="#NVelocity.Http.Tool.MultiViewsTool.DEFAULT_LANGUAGE_KEY">DEFAULT_LANGUAGE_KEY</a>
          <br>        
            The key used to search initialization, context, and JVM
            parameters for the default language to use.
            </td>
      </tr>
      <tr>
        <td class="fieldType" valign="top">string</td>
        <td class="field">
          <a href="#NVelocity.Http.Tool.MultiViewsTool.defaultLanguage">defaultLanguage</a>
          <br>        
            The two character abbreviation for the request's default
            language.
            </td>
      </tr>
    </table>
    <br>
    <a name="constructor-summary">
    </a>
    <table class="table" cellspacing="0">
      <thead>
        <tr>
          <th colspan="2">Constructor Summary</th>
        </tr>
      </thead>
      <tr>
        <td class="constructor" valign="top">
          <a href="#NVelocity.Http.Tool.MultiViewsTool.#ctor">MultiViewsTool</a>()<br>        
            Creates a new uninitialized instance.  Call {@link #init}
            to initialize it.
            </td>
      </tr>
    </table>
    <br>
    <a name="property-summary">
    </a>
    <a name="method-summary">
    </a>
    <table class="table" cellspacing="0">
      <thead>
        <tr>
          <th colspan="2">Method Summary</th>
        </tr>
      </thead>
      <tr>
        <td class="returnType" valign="top">string</td>
        <td class="method">
          <a href="#NVelocity.Http.Tool.MultiViewsTool.findLocalizedResource(System.String,System.String)">findLocalizedResource</a>(string name, string language)<br>        Finds the a localized version of the requested Velocity
            resource (such as a file or template) which is most appropriate
            for the locale of the current request.  Use in conjuction with
            Apache httpd's <pre class="code">MultiViews</pre>, or by itself.Usage from a template would be something like the following:
            <pre class="code">
            #parse ($multiviews.findLocalizedResource("header.vm", "en"))
            #include ($multiviews.findLocalizedResource("my_page.html", "en"))
            #parse ($multiviews.findLocalizedResource("footer.vm", "en"))
            </pre>
            
            You might also wrap this method using another pull/view tool
            which does internationalization/localization/content negation
            for a single point of access.</td>
      </tr>
      <tr>
        <td class="returnType" valign="top">string</td>
        <td class="method">
          <a href="#NVelocity.Http.Tool.MultiViewsTool.findLocalizedResource(System.String)">findLocalizedResource</a>(string name)<br>        
            Calls {@link #findLocalizedResource(String, String)} using the
            default language.
            </td>
      </tr>
      <tr>
        <td class="returnType" valign="top">string</td>
        <td class="method">
          <a href="#NVelocity.Http.Tool.MultiViewsTool.findLocalizedResource(System.String,System.Globalization.CultureInfo)">findLocalizedResource</a>(string name, System.Globalization.CultureInfo locale)<br>        
            Calls {@link #findLocalizedResource(String, String)} using the
            language extracted from <pre class="code">locale</pre>.
            </td>
      </tr>
      <tr>
        <td class="returnType" valign="top">void</td>
        <td class="method">
          <a href="#NVelocity.Http.Tool.MultiViewsTool.Init(System.Object)">Init</a>(object obj)<br>        
            Extracts the default language from the specified
            <pre class="code">ViewContext</pre>, looking first at the Velocity
            context, then the servlet context, then lastly at the JVM
            default.  This "narrow scope to wide scope" pattern makes it
            easy to setup language overrides at different levels within
            your application.
            </td>
      </tr>
    </table>
    <br>
    <table class="subtable" cellspacing="0">
      <thead>
        <tr>
          <th>Methods inherited from class System.Object</th>
        </tr>
      </thead>
      <tr>
        <td>
          <a href="..\..\..\NVelocity/Http/Tool/MultiViewsTool/Equals(System.html#Object)">Equals</a>, <a href="..\..\..\NVelocity/Http/Tool/MultiViewsTool.html#Finalize">Finalize</a>, <a href="..\..\..\NVelocity/Http/Tool/MultiViewsTool.html#GetHashCode">GetHashCode</a>, <a href="..\..\..\NVelocity/Http/Tool/MultiViewsTool.html#GetType">GetType</a>, <a href="..\..\..\NVelocity/Http/Tool/MultiViewsTool.html#MemberwiseClone">MemberwiseClone</a>, <a href="..\..\..\NVelocity/Http/Tool/MultiViewsTool.html#ToString">ToString</a></td>
      </tr>
    </table>
    <br>
    <a name="operator-summary">
    </a>
    <a name="event-summary">
    </a>
    <br>
    <a name="field-detail">
    </a>
    <table class="table" cellspacing="0">
      <thead>
        <tr>
          <th>Field Detail</th>
        </tr>
      </thead>
    </table>
    <a name="NVelocity.Http.Tool.MultiViewsTool.DEFAULT_LANGUAGE_KEY">
    </a>
    <h3>DEFAULT_LANGUAGE_KEY</h3>
    <pre>protected internal string <b>DEFAULT_LANGUAGE_KEY</b></pre>
    <dl>
      <dd>
        <p>
            The key used to search initialization, context, and JVM
            parameters for the default language to use.
            </p>
        <p>
        </p>
      </dd>
    </dl>
    <hr>
    <a name="NVelocity.Http.Tool.MultiViewsTool.defaultLanguage">
    </a>
    <h3>defaultLanguage</h3>
    <pre>protected internal string <b>defaultLanguage</b></pre>
    <dl>
      <dd>
        <p>
            The two character abbreviation for the request's default
            language.
            </p>
        <p>
        </p>
      </dd>
    </dl>
    <a name="constructor-detail">
    </a>
    <table class="table" cellspacing="0">
      <thead>
        <tr>
          <th>Constructor Detail</th>
        </tr>
      </thead>
    </table>
    <a name="NVelocity.Http.Tool.MultiViewsTool.#ctor">
    </a>
    <h3>MultiViewsTool</h3>
    <pre>public MultiViewsTool()</pre>
    <dl>
      <dd>
        <p>
            Creates a new uninitialized instance.  Call {@link #init}
            to initialize it.
            </p>
        <p>
        </p>
      </dd>
    </dl>
    <a name="property-detail">
    </a>
    <a name="method-detail">
    </a>
    <table class="table" cellspacing="0">
      <thead>
        <tr>
          <th>Method Detail</th>
        </tr>
      </thead>
    </table>
    <a name="NVelocity.Http.Tool.MultiViewsTool.findLocalizedResource(System.String,System.String)">
    </a>
    <h3>findLocalizedResource</h3>
    <pre>public string findLocalizedResource(string name,
                                    string language)</pre>
    <dl>
      <dd>
        <p>Finds the a localized version of the requested Velocity
            resource (such as a file or template) which is most appropriate
            for the locale of the current request.  Use in conjuction with
            Apache httpd's <pre class="code">MultiViews</pre>, or by itself.Usage from a template would be something like the following:
            <pre class="code">
            #parse ($multiviews.findLocalizedResource("header.vm", "en"))
            #include ($multiviews.findLocalizedResource("my_page.html", "en"))
            #parse ($multiviews.findLocalizedResource("footer.vm", "en"))
            </pre>
            
            You might also wrap this method using another pull/view tool
            which does internationalization/localization/content negation
            for a single point of access.</p>
        <p>
        </p>
        <b>Parameters:</b>
        <dl>
          <dd>
            <code>name</code> - The unlocalized name of the file to find.
            </dd>
          <dd>
            <code>language</code> - The language to find localized context for.
            </dd>
        </dl>
        <b>Returns:</b>
        <dl>
          <dd>The localized file name, or <pre class="code">name</pre> if it is
            not localizable.
            </dd>
        </dl>
      </dd>
    </dl>
    <hr>
    <a name="NVelocity.Http.Tool.MultiViewsTool.findLocalizedResource(System.String)">
    </a>
    <h3>findLocalizedResource</h3>
    <pre>public string findLocalizedResource(string name)</pre>
    <dl>
      <dd>
        <p>
            Calls {@link #findLocalizedResource(String, String)} using the
            default language.
            </p>
        <p>
        </p>
      </dd>
    </dl>
    <hr>
    <a name="NVelocity.Http.Tool.MultiViewsTool.findLocalizedResource(System.String,System.Globalization.CultureInfo)">
    </a>
    <h3>findLocalizedResource</h3>
    <pre>public string findLocalizedResource(string name,
                                    System.Globalization.CultureInfo locale)</pre>
    <dl>
      <dd>
        <p>
            Calls {@link #findLocalizedResource(String, String)} using the
            language extracted from <pre class="code">locale</pre>.
            </p>
        <p>
        </p>
      </dd>
    </dl>
    <hr>
    <a name="NVelocity.Http.Tool.MultiViewsTool.Init(System.Object)">
    </a>
    <h3>Init</h3>
    <pre>public void Init(object obj)</pre>
    <dl>
      <dd>
        <p>
            Extracts the default language from the specified
            <pre class="code">ViewContext</pre>, looking first at the Velocity
            context, then the servlet context, then lastly at the JVM
            default.  This "narrow scope to wide scope" pattern makes it
            easy to setup language overrides at different levels within
            your application.
            </p>
        <p>
        </p>
        <b>Parameters:</b>
        <dl>
          <dd>
            <code>obj</code> - the current ViewContext
            @throws IllegalArgumentException if the param is not a ViewContext
            </dd>
        </dl>
      </dd>
    </dl>
    <a name="operator-detail">
    </a>
    <a name="event-detail">
    </a>
    <hr>
    <table class="nav">
      <tr>
        <td class="nav1" colspan="2">
          <table cellspacing="3">
            <tr>
              <td>
                <a href="..\..\..\overview-summary.html"> Overview </a>
              </td>
              <td>
                <a href="namespace-summary.html">Namespace</a> </td>
              <td class="nav1sel"> Type </td>
              <td>Use </td>
              <td>Tree </td>
              <td>Deprecated </td>
              <td>Index </td>
              <td>Help </td>
            </tr>
          </table>
        </td>
        <td class="logo" rowspan="2">.NET Framework</td>
      </tr>
      <tr class="nav2">
        <td>PREV TYPE    NEXT TYPE</td>
        <td>FRAMES    NO FRAMES</td>
      </tr>
      <tr class="nav2">
        <td>SUMMARY: INNER | <a href="#field-summary">FIELD</a> | <a href="#constructor-summary">CONST</a> | PROP | <a href="#method-summary">METHOD</a> | OP | EVENT</td>
        <td>DETAIL: <a href="#field-detail">FIELD</a> | <a href="#constructor-detail">CONST</a> | PROP | <a href="#method-detail">METHOD</a> | OP | EVENT</td>
      </tr>
    </table>
  </body>
</html>